package com.legendframework.core.dao.transaction.pojo;

import com.legendframework.core.dao.transaction.enums.TransactionStatus;

import java.sql.Connection;

public class SqlTransaction {

    /**
     * 事务ID
     * 唯一ID
     */
    private String id;

    /**
     * 事务执行状态
     */
    private TransactionStatus status;

    /**
     * 当前线程使用的连接
     */
    private Connection connection;

    public Connection getConnection() {
        return connection;
    }

    public void setConnection(Connection connection) {
        this.connection = connection;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public TransactionStatus getStatus() {
        return status;
    }

    public void setStatus(TransactionStatus status) {
        this.status = status;
    }
}
